<!DOCTYPE html>
<html>
<head>
    <title>用户信息</title>
    <script src="js/jquery-1.12.4.js" type="text/javascript"></script>
    <meta charset="UTF-8">
</head>
<body>
<h1>用户信息</h1>
<div id="user-list"></div>

<script>
    $(document).ready(function(){
        $.ajax({
            url: '/user',
            type: 'GET',
            success: function(data){
                data.forEach(function(user){
                    $('#user-list').append('<p>ID: ' + user.id + ', Username: ' + user.username + ', Level: ' + user.level + '</p>');
                });
            },
            error: function(){
                $('#user-list').append('<p> null </p>');
            }
        });
    });
</script>
</body>
</html>